package cn.zhentao.user.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName t_user
 */
@TableName(value ="t_user")
@Data
public class TUser implements Serializable {
    /**
     * 用户id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户姓名
     */
    @TableField(value = "name")
    private String name;

    /**
     * 账号
     */
    @TableField(value = "username")
    private String username;

    /**
     * 手机号
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 盐
     */
    @TableField(value = "salt")
    private String salt;

    /**
     * 身份证号
     */
    @TableField(value = "IDCard")
    private String idcard;

    /**
     * 地址
     */
    @TableField(value = "address")
    private String address;

    /**
     * 性别(0-男，1-女)
     */
    @TableField(value = "sex")
    private Integer sex;

    /**
     * 学历外键
     */
    @TableField(value = "edu_id")
    private Integer eduId;

    /**
     * 卡的外键
     */
    @TableField(value = "car_id")
    private Integer carId;

    /**
     * 头像
     */
    @TableField(value = "avatar")
    private String avatar;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * (0-正常  1-删除 )
     */
    @TableField(value = "status")
//    @TableLogic(value = "0",delval = "1")
    private Integer status;
    /**
     * 押金
     */
    @TableField(value = "balance")
    private Double balance;

    /**
     * 卡的次数
     */
    @TableField(value = "order_num")
    private Integer orderNum;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 验证码
     */
    @TableField(exist = false)
    private String code;

    @TableField(exist = false)
    private TCard card;   //卡片

    @TableField(exist = false)
    private TEducation education; //学历
}